package com.restaurant.application.exchangegoods;

import com.nebutown.description.UnitDescription;
import com.nebutown.generation.basictype.UID;

public class ExchangeGoodsDesc extends UnitDescription {
    public static void main(String[] args) {
        UnitDescription desc = UnitDescription.basicUnit(ExchangeGoods.class, "ExchangeGoodsData");

        desc.nextBean("ExchangeGoodsData")
                .add("goodsUID", UID.class)
                .add("goodsName", String.class)
                .add("goodsId", String.class)
                .add("customerUID", UID.class)
                // 使用开始时间
                .add("useStartTime", String.class)
                .add("customerId", String.class)
                .add("nickName", String.class)
                .add("phone", String.class)

                .add("accumulate", Long.class)
                // 使用结束时间
                .add("useEndTime", Long.class)
                // 是否使用
                .add("state", String.class)

                .add("couponUID", UID.class)
                // 兑换时间
                .add("exchangeTime", Long.class);
        desc.nextBean("ExchangeDetailData")
                .add("goodsUID", UID.class)
                .add("goodsName", UID.class)

                .add("customerUID", UID.class)
                .add("customerName", UID.class)

                // 兑换时间
                .add("exchangeTime", Long.class);

        desc.addUiFactory("exchangeGoods", "ExchangeDetailData", SUBS.NONE);

        desc.run("./");
    }
}
